package com.jing.taobao.service.user;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.jing.taobao.mapper.user.TaobaoWeiboMapper;
import com.jing.taobao.pojo.user.TaobaoWeibo;

/**
 * 淘宝微博用户绑定的Service
 * @author jing.yue
 * @version 2012/11/8 1.0.0
 */
@Component
public class TaobaoWeiboService {

	@Autowired
	private TaobaoWeiboMapper taobaoWeiboMapper;

	/**
	 * 根据淘宝用户名和微博用户名获取对象
	 * @param taobaoWeibo
	 * @return
	 * @throws Exception
	 */
	public TaobaoWeibo findByTbWbUsername(TaobaoWeibo taobaoWeibo) throws Exception {
		return taobaoWeiboMapper.findByTbWbUsername(taobaoWeibo);
	}

	/**
	 * 保存淘宝微博绑定信息
	 * @param taobaoWeibo
	 * @throws Exception
	 */
	public void saveTaobaoWeibo(TaobaoWeibo taobaoWeibo) throws Exception {
		taobaoWeiboMapper.saveTaobaoWeibo(taobaoWeibo);
	}

}